Skip to content

[python] Add mock_api tests for management-group and arm-resource-identifier Spector scenarios#10945

Closed
Copilot wants to merge 3 commits into
mainfrom
copilot/add-test-case-for-pull-4543
Closed

[python] Add mock_api tests for management-group and arm-resource-identifier Spector scenarios#10945
Copilot wants to merge 3 commits into
mainfrom
copilot/add-test-case-for-pull-4543

Conversation

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Adds http-client-python SDK tests for two new azure-http-specs scenarios introduced in Azure/typespec-azure PR #4543 (management-group scoped resources) and PR #4535 (ARM resource identifiers with scopes).

Changes

  • Spec dependency: bumped @azure-tools/azure-http-specs to 0.1.0-alpha.42-dev.2 — the first build containing both specs that stays peer-compatible with the repo's typespec-azure-core@~0.68.0 (stable alpha.42 requires ^0.69.0).
  • Management group (Azure.ResourceManager.ManagementGroup.ManagementGroupChildResources): new test_azure_arm_managementgroup.py + async counterpart covering get, createOrUpdate (LRO), update (PATCH), delete, listByManagementGroup. Client is constructed without subscription_id (extension resource scoped to a management group).
  • ARM resource identifiers (Azure.ResourceManager.CommonProperties.ArmResourceIdentifiers): extended existing test_azure_arm_commonproperties.py + async counterpart with get/createOrReplace, asserting the four armResourceIdentifier properties (simple / with-type / with-type-and-scope / all-scopes) round-trip.
  • Changelog: added an internal chronus entry.
result = client.management_group_child_resources.get(
    management_group_id="test-mg", management_group_child_resource_name="resource"
)
assert result.properties.provisioning_state == "Succeeded"

Generated SDK code under tests/generated/ remains gitignored and is regenerated by CI.

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service Bot added the emitter:client:python Issue for the Python client emitter: @typespec/http-client-python label Jun 10, 2026
… arm-resource-identifier scenarios

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Copilot AI changed the title [WIP] Add test case for pull 4543 and pull 4535 [python] Add mock_api tests for management-group and arm-resource-identifier Spector scenarios Jun 10, 2026
Copilot finished work on behalf of msyyc June 10, 2026 09:06
Copilot AI requested a review from msyyc June 10, 2026 09:06
@msyyc

msyyc commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

move to #10948

@msyyc msyyc closed this Jun 10, 2026
@msyyc msyyc deleted the copilot/add-test-case-for-pull-4543 branch June 10, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:python Issue for the Python client emitter: @typespec/http-client-python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[python] add test case for https://github.com/Azure/typespec-azure/pull/4543

2 participants